<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('home');
    $router->get('test', 'HomeController@test');
    $router->get('tool', 'ToolController@index');
    $router->post('tool/token', 'ToolController@token')->name('token.create');
    $router->get('tool/token/cloudinary', 'ToolController@cloudinaryToken')->name('token.cloudinary');
    $router->resource('forum', 'ForumController');
    $router->resource('forum-taxonomy', 'ForumTaxonomyController');
    $router->resource('user', 'UserController');
    $router->get('users/select/json', 'UserController@selectJson')->name('user.search');
    $router->resource('topic', 'TopicController');
    $router->resource('sticky-topic', 'StickyTopicController');
    $router->resource('comment', 'CommentController');
    $router->get('comment-find/{comment}', 'CommentController@find')->name('comment.find');
    $router->get('comment_comment', 'CommentController@comment')->name('comment.comment');
    $router->post('comment-restore/{comment}', 'CommentController@restore')->name('comment.restore');
    $router->resource('attachment', 'AttachmentController');
    $router->resource('tag', 'TagController');
    $router->resource('tag-taxonomy', 'TagTaxonomyController');
    $router->post('topic/change/sensitivity', 'TopicController@changeSensitivity')->name('topic.sensitivity.change');
    $router->resource('swiper', 'SwiperController');

});
